package behaviour.interpreter;

/**
 * @author yeyangtao created at 2020/7/7 10:11
 */
public class OrExpression implements Expression {
    private Expression e1 = null;
    private Expression e2 = null;

    public OrExpression(Expression e1, Expression e2) {
        this.e1 = e1;
        this.e2 = e2;
    }

    @Override
    public boolean interpreter(String context) {
        return e1.interpreter(context) || e2.interpreter(context);
    }
}
